<template>
  <van-cell class="event-item"  
  :to="
  
  {
    name:'vote',
    params:{
      voteId:vote.id
    }
  }
  "
  
  >
    <template #title>
     
     <span class="title van-multi-ellipsis--l2" >{{ vote.title }}</span>
 </template>
 <template #label >
  <span>{{ vote.description.replace(/<[^>]+>/g, '') }}</span><br>
  <span>{{ dayjs(vote.startTime).format('YYYY-MM-DD HH:mm:ss')+"--"+dayjs(vote.endTime).format('YYYY-MM-DD HH:mm:ss') }}</span><br>
  <van-tag type="success">{{ vote.clubs.name }}</van-tag><br> 
    </template>
  </van-cell>
</template>

<script>
import dayjs from "../../utils/day.js";
export default {
  props: {
    vote: {
      type: Object,
      required: true
    }
  },
  mounted() {
  },
  setup() {
    return {
      dayjs,
    };
  }
};
</script>
<style scoped>
.event-item .title {
  font-size: 18px;
  color: #3a3a3a;
}
.event-item .van-cell__value {
  flex: unset;
  width: 232px;
  height: 146px;
  padding-left: 25px;
}
.event-item .right-cover {
  width: 132px;
  height: 146px;
}

.event-item .label-info-wrap span {
  font-size: 14px;
  color: #b4b4b4;
  margin-right: 25px;
}
.event-item .cover-wrap {
  display: flex;
}
.event-item .cover-wrap .cover-item {
  /* 平分宽度 */
  flex: 1;
  padding-right: 4px;
}
.event-item .van-cell__value {
  width: 200px;
}

.event-item .label-info-wrap span {
  font-size: 14px;
  color: #b4b4b4;
  margin-right: 25px;
  word-break: break-all;
}

</style>
